package com.example.demo.collection;

import com.example.demo.model.Student;

import java.util.HashMap;
import java.util.Map;

/**
 * @author luowj12
 * @since 2021/4/6 9:34
 */
public class HashCodeTest {
    public static void main(String[] args) {
        /*int hash= 0;
        String s= "ok";
        StringBuilder sb = new StringBuilder(s);

        System.out.println(s.hashCode() + "  " + sb.hashCode());

        String t = new String("ok");
        StringBuilder tb =new StringBuilder(s);
        System.out.println(t.hashCode() + "  " + tb.hashCode());*/
        Student student = new Student("roger");
        student.setName("roger");
        System.out.println(student.hashCode());
        Map map = new HashMap<>();
        map.put("1",1);
        map.get("1");

    }
}
